
package project.cscall.android;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;


public class Goi extends Activity {
	private Button btnStartGoi;
	private EditText edtcallnumber;
	private EditText edtnumberofcall;
	private EditText edtduration;
	private EditText edtpause;
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.goi);
        //Goi cac component trong layout Goi
        btnStartGoi = (Button) findViewById(R.id.btnstartgoi);
        edtcallnumber = (EditText) findViewById(R.id.edtcallnumber);
        edtnumberofcall = (EditText) findViewById(R.id.edtnumberofcall);
        edtduration = (EditText) findViewById(R.id.edtduration);
        edtpause = (EditText) findViewById(R.id.edtpause);
        btnStartGoi.setOnClickListener(new View.OnClickListener() {

			public void onClick(View arg0) {
				
				 	Intent callIntent = new Intent(Intent.ACTION_CALL);
				    callIntent.setData(Uri.parse(edtcallnumber.getText().toString()));
				    startActivity(callIntent);
			}
		});
    }
}


